package com.lw.springmvc.servlet;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Administrator
 * @version 1.0
 * @description:
 * @date 2022/3/8 8:49
 */
@Controller
@RequestMapping("/red")
public class RedirectController {

    @RequestMapping("/test1")
    public String test1(String name){
        return "redirect:/test/test1";
    }

    @RequestMapping("/test2")
    public String test2(String name){
        return "test1?name="+name;
    }
}
